Supercompiling Overloaded Functions

نویسندگان

  • Peter A. Jonsson
  • Johan Nordlander
چکیده

A naı̈ve translation of recursive cases in type class instances will give code that allocates a new dictionary and copies the data from the input dictionary to the new dictionary for the recursive call. This record creation allocates memory and leads to bad performance for a conceptually simple and rather common operation, for example equality between lists. We present a positive supercompilation algorithm, parametrized with respect to evaluation order, and show how this algorithm can remove these allocations resulting in both time and space savings. We also show how a small extension to the folding mechanism of our supercompiler can give similar effects the static argument transformation at nearly no extra cost.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Operator Overloading in Modelica 3.1

The constructor and operator overloading introduced in Modelica 3.1 is discussed. The goal is that elementary operators like “+” or “*” can be overloaded for records. This makes it possible to define and use, in a convenient way, complex numbers, polynomials, transfer functions, state space systems, etc. The chosen approach is different to other languages: (a) Only scalar operations need to be ...

متن کامل

On Modularity of the Completeness in Order-Sorted Term Rewriting Systems

In this paper, we extend the results on the modularity of con uence and termination of single-sorted TRSs[3][6][7] to order-sorted ones. Order-sorted TRSs build a good framework for handling overloaded functions and subtypes. For proving modularity of completeness of ordersorted TRSs, we rst transform a TRS with overloaded functions to a non-overloaded one, and then we demonstrate that our tran...

متن کامل

Generating Test Cases for Overloaded Object-Oriented Programs using EGS (Extended General State-charts)

Overloading and polymorphism are two important aspects in object-oriented programming languages. When an class has either of these two specialities and is depicted with a state-chart which characterizes the behaviour of the class, problems arise. Such as different transition arcs are labelled with the same name but may represent similar duties on that state-chart. General state-charts (GS) can ...

متن کامل

Unifying overloading and λ - abstraction : λ fg Giuseppe Castagna

In this short note we present a minimal system to deal with overloaded functions with late binding, in which λ-abstractions are seen as a special case of overloaded functions with just one code. We prove some relevant properties that this system enjoys, and show its connection with the λ&-calculus. We end by showing the practical interest of this system, in particular in modeling object-oriente...

متن کامل

History-Cognisant Time-Utility-Functions for Scheduling Overloaded Real-Time Control Systems

Time-utility functions (TUFs) as means for scheduling allow to build flexible real-time systems. TUFs yield utility values for single job executions. We extend this concept to history-cognisant utility functions (HCUFs) that assign an overall utility value to a whole task. We aim to use such HCUFs to improve the single-task performance in control systems. We present two extensions of the EDF po...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009